﻿<div class="block member-form common-form">
    <form class="ajaxForm" action="@Url.FrontUrl().SubmissionUrl("RegisterMember")" method="post">
        @Html.ValidationSummary(true)
        @Html.AntiForgeryToken()
      	<div class="member-form-main">
            <table>
                <tr class="field">
                    <th>
                        <label for="UserName">@("Username".Label()):</label>
                    </th>
                    <td>
                        <input id="UserName" name="UserName" type="text" autocomplete="off"  @((new[] { Validator.Required("Required".RawLabel().ToString()).ClientValidationRule }).GenerateHtmlAttributes()) >
                        @Html.ValidationMessageForInput("UserName")
                    </td>
                </tr>
                <tr class="field">
                    <th>
                        <label for="Email">@("Email".Label()):</label>
                    </th>
                    <td>
                        <input id="Email" name="Email" type="text" autocomplete="off" @((new[] { Validator.Required("Required".RawLabel().ToString()).ClientValidationRule }).GenerateHtmlAttributes())
                       >
                        @Html.ValidationMessageForInput("Email")
                    </td>
                </tr>
                <tr class="field">
                    <th>
                        <label for="Password">@("Password".Label()):</label>
                    </th>
                    <td>
                        <input id="Password" name="Password" type="password" autocomplete="off" @((new[] { Validator.Required("Required".RawLabel().ToString()).ClientValidationRule }).GenerateHtmlAttributes())
                       >
                        @Html.ValidationMessageForInput("Password")
                    </td>
                </tr>
                <tr class="field">
                    <th>
                        <label for="ConfirmPassword">@("Confirm password".Label()):</label>
                    </th>
                    <td>
                        <input id="ConfirmPassword" name="ConfirmPassword"  type="password" @((new[] { Validator.Required("Required".RawLabel().ToString()).ClientValidationRule }).GenerateHtmlAttributes())
                             data-val-equalto="@("'Confirm password' and 'Password' do not match.".RawLabel())" data-val-equalto-other="*.Password" >
                        @Html.ValidationMessageForInput("ConfirmPassword")
                    </td>
                </tr>
                <tr>
                    <th></th>
                    <td>
                        <button type="submit">@("Sign up".Label())</button>
                    </td>
                </tr>
            </table>          
      	</div>
        <div class="member-form-side">
      		<p>Already have an account? Please @Html.FrontHtml().PageLink("Login".Label(), "Member/Login")</p>
        </div>
    </form>
</div>
